﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using nanoCMS.Core.Providers;

namespace nanoCMS.Core.Test.Providers
{
    [TestClass]
    public class Tenant_Test
    {
        private ContextBuilder contextBuilder = new ContextBuilder();
        
        [TestMethod]
        public void Add_Tenant()
        {
            var guid = Guid.NewGuid();
            TenantProvider tenantProvider = new TenantProvider(contextBuilder.Entities);
            var tenant = tenantProvider.Add(guid.ToString());
            Assert.AreEqual(tenantProvider.Get(tenant.TenantID).Name, guid.ToString());
        }
    }
}
